package com.hwy.catering.dto;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.hwy.catering.entity.Category;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

/**
 *  返回类别列表的树状节点对象
 */
@Data
public class CategoryDto {

    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    private String label;

    private Integer sort;

    private List<CategoryDto> children = new ArrayList<>();
}
